# import numpy as np
#
# a = np.arange(24)
# print(a.ndim)  # a 现只有一个维度
# print(a)
# # 现在调整其大小
# b = a.reshape(2, 4, 3)  # b 现在拥有三个维度
# print(b.ndim)
# print(b)
#
# # 展平数组：b.flatten() == b.reshape(-1)
#
# print(b.flatten())
# # print(b.reshape(-1))

import numpy as np

a = np.array([[1, 2, 3], [4, 5, 6]])
a.shape = (3, 2)
print(a)